package com.tianbo.common;

import com.tianbo.util.dao.Page;
import com.tianbo.util.dao.Totals;

import java.io.Serializable;
import java.util.List;

/**
 * 返回对象以及对象分页
 * @param <T>
 */
public class ModelAndPage<T> implements Serializable {

    private static final long serialVersionUID = 6732325477388107799L;

    private List<T> modelList;

    private Page page;

    private Totals totals;


    public ModelAndPage(){

    }
    public ModelAndPage(List<T> list,Page page){
        this.modelList = list;
        this.page = page;
    }
    public ModelAndPage(List<T> list,Page page,Totals totals){
        this.modelList = list;
        this.page = page;
        this.totals = totals;
    }

    public List<T> getModel() {
        return modelList;
    }

    public void setModel(List<T> model) {
        this.modelList = model;
    }

    public Page getPage() {
        return page;
    }

    public void setPage(Page page) {
        this.page = page;
    }

    public Totals getTotals() {
        return totals;
    }

    public void setTotals(Totals totals) {
        this.totals = totals;
    }


}
